﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="FiveElementsAdmin.ascx.cs"
    Inherits="Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.OpenPersonality.FiveElementsAdmin" %>
<owc:OwGrid ID="FiveElementsGrid" runat="server" DataSourceID="FiveElementsOds" SkinID="OwGridAdmin">
    <MasterTableView DataSourceID="FiveElementsOds" DataKeyNames="FiveElementID">
        <CommandItemSettings ExportToPdfText="Export to PDF" AddNewRecordText="<%$OwR:AddNewRecordText %>"
            RefreshText="<%$ OwR:RefreshText %>"></CommandItemSettings>
        <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </RowIndicatorColumn>
        <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
            <HeaderStyle Width="20px"></HeaderStyle>
        </ExpandCollapseColumn>
        <Columns>
            <owct:GridBoundColumn DataField="FiveElementID" FilterControlAltText="Filter FiveElementID column"
                HeaderText='<%$OwR: Code %>' SortExpression="FiveElementID" UniqueName="FiveElementID">
            </owct:GridBoundColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn1 column" HeaderText='<%$ OwR: TitleLabel %>'>
                <ItemTemplate>
                    <table>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="Name" />
                            </td>
                            <td>
                                <%# Eval("Name")%>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <owc:OwR runat="server" OwText="LanguageCode" />
                            </td>
                            <td>
                                <%# Eval("LanguageCode")%>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn1 column" HeaderText="<%$ OwR:ThumbImage %>"
                UniqueName="TemplateColumn1">
                <ItemTemplate>
                    <div align="center">
                        <img src='<%# Eval("ThumbImage") %>' height="100" width="150" /></div>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$ OwR:Modify %>"
                UniqueName="TemplateColumn3">
                <ItemTemplate>
                    <div align="center">
                        <a href='/Admin/Views/Site/FiveElementsEdit.aspx?Id=<%#Eval("FiveElementID")%>'>
                            <img src='/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/edit.gif' runat="server"
                                id="UpdateImage" /></a>
                    </div>
                </ItemTemplate>
            </owct:GridTemplateColumn>
            <owct:GridTemplateColumn FilterControlAltText="Filter TemplateColumn column" HeaderText="<%$OwR:Delete %>"
                UniqueName="TemplateColumn">
                <ItemTemplate>
                    <div align="center">
                        <asp:ImageButton CausesValidation="true" OnClientClick='if(!confirm("Are you sure to  Delete?")) return false'
                            ID="EditDeleteButton1" CommandName="Delete" runat="server" SkinID="OwConfirmButton"
                            ImageUrl="/App_Themes/OpenWeb/OwImages/vi-VN/CommandNameIcons/delete.gif" />
                    </div>
                </ItemTemplate>
            </owct:GridTemplateColumn>
        </Columns>
        <EditFormSettings EditFormType="Template">
            <FormTemplate>
                <%
                    Response.Redirect("FiveElementsEdit.aspx");
                %>
            </FormTemplate>
        </EditFormSettings>
    </MasterTableView>
    <FilterMenu EnableImageSprites="False">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </FilterMenu>
    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
        <WebServiceSettings>
            <ODataSettings InitialContainerName="">
            </ODataSettings>
        </WebServiceSettings>
    </HeaderContextMenu>
</owc:OwGrid>
<owc:OwObjectDataSource ID="FiveElementsOds" runat="server" OldValuesParameterFormatString="original_{0}"
    SelectMethod="OwGetByDynamic" TypeName="Micronet.OpenWeb.Com.BLL.OwFiveElementsBLL"
    DataObjectTypeName="Micronet.OpenWeb.Entity.OwFiveElementsEntity" DeleteMethod="OwDelete"
    InsertMethod="OwInsert" UpdateMethod="OwUpdate" EnablePaging="true" SelectCountMethod="OwGetByDynamicCount">
    <SelectParameters>
        <asp:Parameter Name="languageCode" Type="String" />
        <asp:Parameter Name="sortClause" Type="String" />
        <asp:Parameter Name="sortDirection" Type="String" />
        <asp:Parameter Name="startRowIndex" Type="Int32" />
        <asp:Parameter Name="maximumRows" Type="Int32" />
    </SelectParameters>
</owc:OwObjectDataSource>
